package com.iraeta.service.sys;

import com.iraeta.entity.Role;

import java.util.List;

public interface RoleService {
    public void addRole(Role role);
    public void updateRole(Role user);
    public void deleteRole(int id);
    public Role getRole(int id);
    public List<Role> getRoleByName(String roleName);

    /*userRole相关*/
    public List<Role> listAllRole();
    public List<Role> listRoleByUserId(int userId);


    /*role permission相关*/
    public List<Integer> listRolePermission(int roleId);
    public void saveRolePermission(int roleId, List<Integer> permissionList);
}
